package com.team.RunsFast_Api.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.team.RunsFast_Api.dto.CartDetailDto;
import com.team.RunsFast_Api.dto.CartFoodDto;
import com.team.runsfast.entity.Cart;
import com.team.runsfast.entity.Food;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Description:
 * @Author: 邢朋辉
 * @Date: 2022/09/22 13:09:50
 */
public interface CartDao extends BaseMapper<Cart> {
    @Select("select c.*,f.title,f.currentprice,f.imgurl from t_cart c left join t_foods f on c.fid=f.id where c.uid=#{uid} order by c.ctime desc")
    List<CartDetailDto> selectByUid(long uid);

    List<CartFoodDto> selectByids(List<Long> ids);
}
